<template>
<h1>布局组件</h1>

  <h3>两等分</h3>
  <el-row>
    <el-col :span="12"><div class="c1"></div></el-col>
    <el-col :span="12"><div class="c1"></div></el-col>
  </el-row>
  <h3>6等分</h3>
  <el-row :gutter="10">
    <el-col :span="4"><div class="c1"></div></el-col>
    <el-col :span="4"><div class="c1"></div></el-col>
    <el-col :span="4"><div class="c1"></div></el-col>
    <el-col :span="4"><div class="c1"></div></el-col>
    <el-col :span="4"><div class="c1"></div></el-col>
    <el-col :span="4"><div class="c1"></div></el-col>
  </el-row>
<!-- 1+2+3=6  24/6=4    4*1: 4*2 :4*3 -->
  <h3>1:2:3</h3>
  <el-row :gutter="10">
    <el-col :span="4"><div class="c1"></div></el-col>
    <el-col :span="8"><div class="c1"></div></el-col>
    <el-col :span="12"><div class="c1"></div></el-col>
  </el-row>
  <h3>两等分并居中</h3>
  <div style="width: 1200px;margin: 0 auto">
    <el-row>
      <el-col :span="12"><div class="c1"></div></el-col>
      <el-col :span="12"><div class="c1"></div></el-col>
    </el-row>
  </div>
  <h3>列偏移</h3>
  <el-row>
    <el-col :span="20" :offset="4"><div class="c1"></div></el-col>
  </el-row>
  <h3>嵌套(可以嵌套无数层)</h3>
  <el-row>
    <el-col :span="12"><div class="c1"></div></el-col>
    <el-col :span="12">
      <el-row>
        <el-col :span="12"><div class="c1"></div></el-col>
        <el-col :span="12">
          <el-row>
            <el-col v-for="item in 24" :span="1"><div class="c1">{{item}}</div></el-col>
          </el-row>
        </el-col>
      </el-row>
    </el-col>
  </el-row>

  <h3>一行显示3张图片</h3>
  <el-row :gutter="20">
    <el-col :span="8"><img src="b.jpg" style="width: 100%"></el-col>
    <el-col :span="8"><img src="b.jpg" style="width: 100%"></el-col>
    <el-col :span="8"><img src="b.jpg" style="width: 100%"></el-col>
  </el-row>
  <h3>一行显示8张图片</h3>
  <el-row :gutter="20">
    <el-col v-for="item in 8" :span="3"><img src="b.jpg" style="width: 100%"></el-col>
  </el-row>
</template>

<script setup>

</script>

<style scoped>
.c1{height: 50px; border: 1px solid red;border-radius: 5px}
</style>